
var page = tactile.page;

var HomeSmartphone = function () {
	
	this.init = function () {
		this.detectOrientation();
		tactile.EventManager.addResizeListener(this.detectOrientation);
	},
	this.restart = function () { };
	
	this.detectOrientation = function() {		
		this.changeFashionSpreadImage();
	};
	
	this.changeFashionSpreadImage= function() {

//		var fashionspread1 = page.getComponent("vw-fashionspread1");
//		var fashionspread2 = page.getComponent("vw-fashionspread2");
//		var fashionspread3 = page.getComponent("vw-fashionspread3");
//		
//		if(tactile.Device.screen.isLandscape()){
//
//			fashionspread1.addClass("fashionspread1-landscape-bg");
//			fashionspread1.removeClass("fashionspread1-portrait-bg");
//			
//			fashionspread2.addClass("fashionspread2-landscape-bg");
//			fashionspread2.removeClass("fashionspread2-portrait-bg");
//			
//			fashionspread3.addClass("fashionspread3-landscape-bg");
//			fashionspread3.removeClass("fashionspread3-portrait-bg");
//
//			
//		}else{
//
//			fashionspread1.addClass("fashionspread1-portrait-bg");
//			fashionspread1.removeClass("fashionspread1-landscape-bg");
//			
//			fashionspread2.addClass("fashionspread2-portrait-bg");
//			fashionspread2.removeClass("fashionspread2-landscape-bg");
//			
//			fashionspread3.addClass("fashionspread3-portrait-bg");
//			fashionspread3.removeClass("fashionspread3-landscape-bg");
//		
//		}		
	};
}

tactile.page.onready(function () {
	if (typeof(router) == "undefined") {
		var home = new HomeSmartphone();
		home.init();
		console.log("Smartphone Mode loaded!!!");
	}		
});